package demo_designPattern.proxy.staticProxy;

public class DataCollectorAnalyseTimeProxy implements Collector {
    private Collector collector; 


    public DataCollectorAnalyseTimeProxy(Collector collector) {
	super();
	this.collector = collector;
    }

    @Override
    public void collect() throws InterruptedException {
	long start = System.currentTimeMillis();
	collector.collect();
	System.out.println("the execute time:    "+(System.currentTimeMillis()-start));
    }

}
